<?php 

if(is_array($video_list) && count($this->videos)>0){ ?>
                    <!--video-bai hat-->
                      <div id="gioithieu">
                           <div class="menu-sukien"> Video & Bài hát  </div>
                           <div class="tex-noidung-gioithieu">
                                 <div class="noidung-video-left">
                                    <?php if($this->info != null && $this->info->vid>0){ ?>
                                    <div>
                                        <div id="flashvideo"></div>
                                      <?
                                        $t = time();
                                        $tk = videoGetSecureTocken($this->info->vid, $t);
                                        $t_hex = sprintf("%08x", $t);
                                        $server="http://video.tamtay.vn";
                                        $cfg2=$server."/play/config/" . $this->info->vid . "/2/" . $t_hex . "/" . $tk;
                                        ?>
                                        <script type="text/javascript">
                                            var so1 = new SWFObject("<?=$server?>/flash/player/flowplayer.swf?ver=2.1.5","single","350","295","7");
                                            so1.addParam("allowFullScreen", "true");
                                            so1.addParam("allowSciptAccess", "always");
                                            so1.addParam("wmode", "transparent");
                                            var v=new Array(<?echo strlen($cfg2)?>);
                                            <?
                                            for ($i=0; $i<strlen($cfg2); $i++)
                                            {
                                                echo 'v[' . $i . ']="' . $cfg2[$i] . '"; ';
                                            }
                                            ?>
                                            so1.addVariable("config","{configFileName: '" + v.join("") + "'}");
                                            so1.write("flashvideo");
                                        </script>
                                        <a href="<?php echo "http://video.tamtay.vn/play/" . $this->info->vid;?>"><?php echo check_plain($this->info->title);?></a>
                                    </div>
                                <?php } ?>                             
                                 </div>
                                 <div class="menu-noidung-right">
                                      <div style="padding-top:10px;">
                                            <div class="video-group">
                                    
                                            <?php 
                                            //eprint($this->videos);
                                            $totalVideo = count($this->videos);
                                            if($totalVideo>0){
                                                for($i=0; $i<$totalVideo && $i<3; $i++){
                                                    $clip = $this->videos[$i];
                                                    if ($clip->image_preview=="")
                                                    {
                                                        $img=EVENT_IMG_SERVER . "http://img.tamtay.vn/files/images/photo.jpg";
                                                    }
                                                    else
                                                        $img=EVENT_IMG_SERVER . $clip->image_preview;
                                                    $img='<img src="' . $img . '" width="110" height="82" class="img_noborder" alt="' . check_plain($clip->title) . '">';
                                                    //$star = ceil(($clip->star_rating)/20);
                                            ?>
                                                    
                                            <div class="video-item">
                                                <div class="video-thumb"><a href="<?php echo "http://video.tamtay.vn/play/" . $clip->vid;?>" title="<?php echo check_plain($clip->title)?>"><?php echo $img?></a></div>
                                                <div class="video-info">
                                                    <div class="video-subject"><a href="<?php echo "http://video.tamtay.vn/play/" . $clip->vid;?>"><?php echo check_plain($clip->title);?></a></div>
                                                </div>
                                            </div>
                                            <?php
                                                }// End of for loop
                                            }
                                            ?>
                                        </div>
                                      </div>
                                 </div>
                           </div>
                           <div class="clear"></div>
                           <div class="chitiet"><a href="/event/video/<?php echo $this->event-eid;?>"> Xem hết &raquo;</a></div>
                      </div>
<?php }// End of If ?>